package com.example.gestureactivity2;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.content.Intent;

public class MainActivity extends BaseActivity implements OnClickListener {

	private Button	mBtnGoAnohter;
	private Button	mBtnGoWeb;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		initView();
	}

	private void initView() {
		mBtnGoAnohter = (Button) findViewById(R.id.btn_go_another);
		mBtnGoWeb = (Button) findViewById(R.id.btn_go_webview);

		setListener();
	}

	private void setListener() {
		mBtnGoAnohter.setOnClickListener(this);
		mBtnGoWeb.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		if (v == mBtnGoAnohter) {
			Intent intent = new Intent(this, AnotherActivity.class);
			startActivity(intent);
		} else if (v == mBtnGoWeb) {
			Intent intent = new Intent(this, WebViewActivity.class);
			startActivity(intent);
		}

	}

}
